/*
 * BanBu_ProgressCell
 * @description 本文件提供相册文件单个上传文件的定制cell
 * @package
 * @author 		yinlinlin
 * @copyright
 * @version 		1.0
 * @description 本文件提供相册文件单个上传文件的定制cell
 */

#import "BanBu_ProgressCell.h"

@implementation BanBu_ProgressCell

@synthesize progressIng = _progressIng;
@synthesize progress = _progress;
@synthesize progressLa = _progressLa;
- (void)dealloc
{
    _progressIng = nil;
    _progressButtom = nil;
    _albumTitle = nil;
    _thumbImgV = nil;
    [super dealloc];
}
- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        
        _progressButtom = [[UIImageView alloc]initWithFrame:CGRectMake(234, 20, 78, 15)];
        _progressButtom.image = [UIImage imageNamed:@"progressButtom.png"];
        [self.contentView addSubview:_progressButtom];
        [_progressButtom release];
        
        _progressIng = [[UIImageView alloc]initWithFrame:CGRectZero];
        _progressIng.image = [[UIImage imageNamed:@"progressImg.png"] resizableImageWithCapInsets:UIEdgeInsetsMake(6.0, 6.0, 6.0, 6.0)];
        [_progressButtom addSubview:_progressIng];
        [_progressIng release];
        
        _thumbImgV = [[UIImageView alloc]initWithFrame:CGRectMake(10, 10, 43, 43)];
        [self.contentView addSubview:_thumbImgV];
        [_thumbImgV release];
        
        _albumTitle = [[UILabel alloc]initWithFrame:CGRectMake(57, 23, 170, 17)];
        _albumTitle.backgroundColor = [UIColor clearColor];
        _albumTitle.font = [UIFont systemFontOfSize:15.0];
        [self.contentView addSubview:_albumTitle];
        [_albumTitle release];
        UIImageView * lineImgV = [[UIImageView alloc]initWithFrame:CGRectMake(0, 62.5, __MainScreen_Width, 0.5)];
        lineImgV.backgroundColor = UIColorWithRGB(193, 193, 193, 1.0);
        [self.contentView addSubview:lineImgV];
        [lineImgV release];
        _progressLa = [[UILabel alloc]initWithFrame:CGRectMake(234, 37, 78, 12)];
        _progressLa.textAlignment = kTextAlignmentCenter;
        _progressLa.backgroundColor = [UIColor clearColor];
        _progressLa.font = [UIFont systemFontOfSize:10.0];
        [self.contentView addSubview:_progressLa];
    }
    return self;
}

- (void)updateProgressCellData:(NSDictionary *)updateDic
{
    [_progressIng setFrame:CGRectZero];
    _thumbImgV.image = [updateDic valueForKey:@"image"];
    _albumTitle.text = [NSString stringWithFormat:@"%@《%@》", NSLocalizedString(@"updateTo", 上传到),[updateDic valueForKey:@"title"]];
}
- (void)awakeFromNib
{
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
